home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-02-09 | 1.0 KB | 34 lines | [TEXT/GEOL] |
- Item 6748513 6-Feb-90 10:15PST
-
- From: MACDOUGALD1 MacDougald, Joe
-
- To: CPLUS.APPLE$ C++ Interest List--Apple Employees
-
- cc: CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: Static Link
-
-
- To: CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$
-
- From: MacDougald1
-
- Re: StaticLink
-
-
- The static_link field in C++ code is there to provide for "up-level" variable
- access a la A6 links for nested procedures in Pascal. If you pass a NIL for
- that parameter the CallDoToFields glue (shown in Keith Rollins previous link on
- this subject) will optimize the static link out and your stack frames will be
- different sizes in the Pascal and C/C++ worlds (not good).
-
- If you do not need to access data in the calling routine, declare:
-
- const void* const kNoStaticLink = (void*)-1;
-
- // constant pointer to constant data, BTW
-
- and pass kNoStaticLink as the parameter.
-
-